package com.hongxun.modules.bss.service.impl;

import java.util.UUID;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

import com.hongxun.modules.bss.dao.ABatchDao;
import com.hongxun.modules.bss.entity.ABatchEntity;
import com.hongxun.modules.bss.service.ABatchService;



@Service("aBatchService")
public class ABatchServiceImpl implements ABatchService {
	@Autowired
	private ABatchDao aBatchDao;
	
	@Override
	public ABatchEntity queryObject(String guid){
		return aBatchDao.queryObject(guid);
	}
	
	@Override
	public List<ABatchEntity> queryList(Map<String, Object> map){
		return aBatchDao.queryList(map);
	}
	
	@Override
	public int queryTotal(Map<String, Object> map){
		return aBatchDao.queryTotal(map);
	}
	
	@Override
	public void save(ABatchEntity aBatch){
		if(aBatch.getGuid()==null||aBatch.getGuid().equals("")) {
			aBatch.setGuid(UUID.randomUUID().toString());
		}
		aBatchDao.save(aBatch);
	}
	
	@Override
	public void update(ABatchEntity aBatch){
		aBatchDao.update(aBatch);
	}
	
	@Override
	public void delete(String guid){
		aBatchDao.delete(guid);
	}
	
	@Override
	public void deleteBatch(String[] guids){
		aBatchDao.deleteBatch(guids);
	}

}
